/* 20 */
  /***/
  (function(module, exports, __webpack_require__) {

    "use strict";


    Object.defineProperty(exports, "__esModule", {
      value: true
    });

    var _keys = __webpack_require__(33);

    var _keys2 = _interopRequireDefault(_keys);

    var _toConsumableArray2 = __webpack_require__(8);

    var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);

    var _getPrototypeOf = __webpack_require__(3);

    var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);

    var _classCallCheck2 = __webpack_require__(0);

    var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);

    var _createClass2 = __webpack_require__(1);

    var _createClass3 = _interopRequireDefault(_createClass2);

    var _possibleConstructorReturn2 = __webpack_require__(4);

    var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);

    var _get2 = __webpack_require__(6);

    var _get3 = _interopRequireDefault(_get2);

    var _inherits2 = __webpack_require__(5);

    var _inherits3 = _interopRequireDefault(_inherits2);

    var _mobx = __webpack_require__(2);

    var _bind = __webpack_require__(10);

    var _bind2 = _interopRequireDefault(_bind);

    var _XbsjBase7 = __webpack_require__(7);

    var _XbsjBase8 = _interopRequireDefault(_XbsjBase7);

    var _XbsjCzmObj2 = __webpack_require__(11);

    var _XbsjCzmObj3 = _interopRequireDefault(_XbsjCzmObj2);

    var _XbsjObject = __webpack_require__(9);

    var _XbsjObject2 = _interopRequireDefault(_XbsjObject);

    var _registerInteractionProperty = __webpack_require__(15);

    var _uniquePositions = __webpack_require__(250);

    var _uniquePositions2 = _interopRequireDefault(_uniquePositions);

    var _Points = __webpack_require__(43);

    var _Points2 = _interopRequireDefault(_Points);

    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : {
        default: obj
      };
    }

    /**
     * 折线材质
     * @namespace
     * @name Material
     * @memberof Obj.Polyline
     */

    /**
     * 纯色材质
     * @class
     * @memberof Obj.Polyline.Material
     * @extends XbsjBase
     */

    // TODO(vtxf): uniquePositions还要应用到polygon当中去，避免底层崩溃
    var Color = function(_XbsjBase) {
      (0, _inherits3.default)(Color, _XbsjBase);

      function Color() {
        (0, _classCallCheck3.default)(this, Color);

        var _this = (0, _possibleConstructorReturn3.default)(this, (Color.__proto__ || (0, _getPrototypeOf2
          .default)(Color)).call(this));

        (0, _mobx.extendObservable)(_this, {
          _material: Cesium.Material.fromType('Color'),
          get material() {
            return this._material;
          }
        }, {
          material: _mobx.computed
        });

        _this._disposers = [];
        _this._disposers.push((0, _mobx.autorun)(function() {
          _this._material.uniforms.color = new(Function.prototype.bind.apply(Cesium.Color, [null].concat((0,
            _toConsumableArray3.default)(_this.color))))();
        }));
        return _this;
      }

      (0, _createClass3.default)(Color, [{
        key: 'destroy',
        value: function destroy() {
          this._disposers.forEach(function(d) {
            return d();
          });
          this._disposers.length = 0;
          return (0, _get3.default)(Color.prototype.__proto__ || (0, _getPrototypeOf2.default)(Color
            .prototype), 'destroy', this).call(this);
        }
      }]);
      return Color;
    }(_XbsjBase8.default);

    Color.defaultOptions = {
      /**
       * 颜色叠加
       * @type {array}
       * @instance
       * @default [1, 1, 1, 1]
       * @memberof Obj.Polyline.Material.Color
       */
      color: [1, 1, 1, 1]
      // color: { type: 'array', items: { type: 'number' }, minItems: 4, maxItems: 4, default: [1, 1, 1, 1], description: '颜色叠加'},     
    };

    /**
     * 点画线材质
     * @class
     * @memberof Obj.Polyline.Material
     * @extends XbsjBase
     */

    var PolylineDash = function(_XbsjBase2) {
      (0, _inherits3.default)(PolylineDash, _XbsjBase2);

      function PolylineDash() {
        (0, _classCallCheck3.default)(this, PolylineDash);

        var _this2 = (0, _possibleConstructorReturn3.default)(this, (PolylineDash.__proto__ || (0,
          _getPrototypeOf2.default)(PolylineDash)).call(this));

        (0, _mobx.extendObservable)(_this2, {
          _material: Cesium.Material.fromType('PolylineDash'),
          get material() {
            return this._material;
          }
        }, {
          material: _mobx.computed
        });

        _this2.disposers.push((0, _mobx.autorun)(function() {
          (0, _keys2.default)(_this2._defaultOptions).forEach(function(key) {
            if (key === 'color' || key === 'gapColor') {
              _this2._material.uniforms[key] = new(Function.prototype.bind.apply(Cesium.Color, [null]
                .concat((0, _toConsumableArray3.default)(_this2[key]))))();
            } else {
              _this2._material.uniforms[key] = _this2[key];
            }
          });
        }));
        return _this2;
      }

      return PolylineDash;
    }(_XbsjBase8.default);

    PolylineDash.defaultOptions = {
      /**
       * 颜色叠加 color for the line.
       * @type {array}
       * @instance
       * @default [1, 0, 1, 1]
       * @memberof Obj.Polyline.Material.PolylineDash
       */
      color: [1, 0, 1, 1], // color for the line.
      /**
       * 间隙颜色叠加 color for the gaps in the line.
       * @type {array}
       * @instance
       * @default [0, 0, 0, 0]]
       * @memberof Obj.Polyline.Material.PolylineDash
       */
      gapColor: [0, 0, 0, 0], // color for the gaps in the line.
      /**
       * Dash length in pixels.
       * @type {number}
       * @instance
       * @default 16
       * @memberof Obj.Polyline.Material.PolylineDash
       */
      dashLength: 16, // Dash length in pixels.
      /**
       * The 16 bit stipple pattern for the line..
       * @type {number}
       * @instance
       * @default 255
       * @memberof Obj.Polyline.Material.PolylineDash
       */
      dashPattern: 255 // The 16 bit stipple pattern for the line..
    };

    /**
     * 箭头材质
     * @class
     * @memberof Obj.Polyline.Material
     * @extends XbsjBase
     */

    var PolylineArrow = function(_XbsjBase3) {
      (0, _inherits3.default)(PolylineArrow, _XbsjBase3);

      function PolylineArrow() {
        (0, _classCallCheck3.default)(this, PolylineArrow);

        var _this3 = (0, _possibleConstructorReturn3.default)(this, (PolylineArrow.__proto__ || (0,
          _getPrototypeOf2.default)(PolylineArrow)).call(this));

        (0, _mobx.extendObservable)(_this3, {
          _material: Cesium.Material.fromType('PolylineArrow'),
          get material() {
            return this._material;
          }
        }, {
          material: _mobx.computed
        });

        _this3.disposers.push((0, _mobx.autorun)(function() {
          (0, _keys2.default)(_this3._defaultOptions).forEach(function(key) {
            if (key === 'color') {
              _this3._material.uniforms[key] = new(Function.prototype.bind.apply(Cesium.Color, [null]
                .concat((0, _toConsumableArray3.default)(_this3[key]))))();
            } else {
              _this3._material.uniforms[key] = _this3[key];
            }
          });
        }));
        return _this3;
      }

      return PolylineArrow;
    }(_XbsjBase8.default);

    PolylineArrow.defaultOptions = {
      /**
       * 颜色叠加
       * @type {array}
       * @instance
       * @default [1, 1, 1, 1]
       * @memberof Obj.Polyline.Material.PolylineArrow
       */
      color: [1, 1, 1, 1]
    };

    /**
     * 发光材质
     * @class
     * @memberof Obj.Polyline.Material
     * @extends XbsjBase
     */

    var PolylineGlow = function(_XbsjBase4) {
      (0, _inherits3.default)(PolylineGlow, _XbsjBase4);

      function PolylineGlow() {
        (0, _classCallCheck3.default)(this, PolylineGlow);

        var _this4 = (0, _possibleConstructorReturn3.default)(this, (PolylineGlow.__proto__ || (0,
          _getPrototypeOf2.default)(PolylineGlow)).call(this));

        (0, _mobx.extendObservable)(_this4, {
          _material: Cesium.Material.fromType('PolylineGlow'),
          get material() {
            return this._material;
          }
        }, {
          material: _mobx.computed
        });

        _this4.disposers.push((0, _mobx.autorun)(function() {
          (0, _keys2.default)(_this4._defaultOptions).forEach(function(key) {
            if (key === 'color') {
              _this4._material.uniforms[key] = new(Function.prototype.bind.apply(Cesium.Color, [null]
                .concat((0, _toConsumableArray3.default)(_this4[key]))))();
            } else {
              _this4._material.uniforms[key] = _this4[key];
            }
          });
        }));
        return _this4;
      }

      return PolylineGlow;
    }(_XbsjBase8.default);

    PolylineGlow.defaultOptions = {
      /**
       * 颜色叠加
       * @type {array}
       * @instance
       * @default [1, 1, 1, 1]
       * @memberof Obj.Polyline.Material.PolylineGlow
       */
      color: [1, 1, 1, 1], // color and maximum alpha for the glow on the line.
      /**
       * strength of the glow, as a percentage of the total line width (less than 1.0).
       * @type {number}
       * @instance
       * @default 0.25
       * @memberof Obj.Polyline.Material.PolylineGlow
       */
      glowPower: 0.25, // strength of the glow, as a percentage of the total line width (less than 1.0).
      /**
       * strength of the tapering effect, as a percentage of the total line length. If 1.0 or higher, no taper effect is used.    
       * @type {number}
       * @instance
       * @default 1.0
       * @memberof Obj.Polyline.Material.PolylineGlow
       */
      taperPower: 1.0 // strength of the tapering effect, as a percentage of the total line length. If 1.0 or higher, no taper effect is used.    
    };

    /**
     * 外轮廓材质
     * @class
     * @memberof Obj.Polyline.Material
     * @extends XbsjBase
     */

    var PolylineOutline = function(_XbsjBase5) {
      (0, _inherits3.default)(PolylineOutline, _XbsjBase5);

      function PolylineOutline() {
        (0, _classCallCheck3.default)(this, PolylineOutline);

        var _this5 = (0, _possibleConstructorReturn3.default)(this, (PolylineOutline.__proto__ || (0,
          _getPrototypeOf2.default)(PolylineOutline)).call(this));

        (0, _mobx.extendObservable)(_this5, {
          _material: Cesium.Material.fromType('PolylineOutline'),
          get material() {
            return this._material;
          }
        }, {
          material: _mobx.computed
        });

        _this5.disposers.push((0, _mobx.autorun)(function() {
          (0, _keys2.default)(_this5._defaultOptions).forEach(function(key) {
            if (key === 'color' || key === 'outlineColor') {
              _this5._material.uniforms[key] = new(Function.prototype.bind.apply(Cesium.Color, [null]
                .concat((0, _toConsumableArray3.default)(_this5[key]))))();
            } else {
              _this5._material.uniforms[key] = _this5[key];
            }
          });
        }));
        return _this5;
      }

      return PolylineOutline;
    }(_XbsjBase8.default);

    PolylineOutline.defaultOptions = {
      /**
       * 颜色叠加
       * @type {array}
       * @instance
       * @default [1, 1, 1, 1]
       * @memberof Obj.Polyline.Material.PolylineOutline
       */
      color: [1, 1, 1, 1],
      /**
       * 外轮廓颜色叠加
       * @type {array}
       * @instance
       * @default [1, 1, 1, 1]
       * @memberof Obj.Polyline.Material.PolylineOutline
       */
      outlineColor: [1, 1, 1, 1],
      /**
       * 外轮廓宽度
       * @type {number}
       * @instance
       * @default 0.25
       * @memberof Obj.Polyline.Material.PolylineOutline
       */
      outlineWidth: 0.25
    };

    /**
     * OD线材质
     * @class
     * @memberof Obj.Polyline.Material
     * @extends XbsjBase
     */

    var XbsjODLine = function(_XbsjBase6) {
      (0, _inherits3.default)(XbsjODLine, _XbsjBase6);

      function XbsjODLine() {
        (0, _classCallCheck3.default)(this, XbsjODLine);

        var _this6 = (0, _possibleConstructorReturn3.default)(this, (XbsjODLine.__proto__ || (0, _getPrototypeOf2
          .default)(XbsjODLine)).call(this));

        (0, _mobx.extendObservable)(_this6, {
          _material: Cesium.Material.fromType('XbsjODLine'),
          get material() {
            return this._material;
          }
        }, {
          material: _mobx.computed
        });

        _this6.disposers.push((0, _mobx.autorun)(function() {
          (0, _keys2.default)(_this6._defaultOptions).forEach(function(key) {
            if (key === 'color') {
              _this6._material.uniforms[key] = new(Function.prototype.bind.apply(Cesium.Color, [null]
                .concat((0, _toConsumableArray3.default)(_this6[key]))))();
            } else {
              _this6._material.uniforms[key] = _this6[key];
            }
          });
        }));
        return _this6;
      }

      return XbsjODLine;
    }(_XbsjBase8.default);

    XbsjODLine.defaultOptions = {
      /**
       * 颜色叠加
       * @type {array}
       * @instance
       * @default [1, 1, 0, 1]
       * @memberof Obj.Polyline.Material.XbsjODLine
       */
      color: [1, 1, 0, 1],
      /**
       * 一次动画的循环帧数
       * @type {number}
       * @instance
       * @default 45
       * @memberof Obj.Polyline.Material.XbsjODLine
       */
      totoalFrameCount: 45
    };

    /**
     * 折线
     * @memberof Obj
     * @class
     * @extends XbsjCzmObj
     */

    var Polyline = function(_XbsjCzmObj) {
      (0, _inherits3.default)(Polyline, _XbsjCzmObj);

      function Polyline(earth, guid) {
        (0, _classCallCheck3.default)(this, Polyline);

        var _this7 = (0, _possibleConstructorReturn3.default)(this, (Polyline.__proto__ || (0, _getPrototypeOf2
          .default)(Polyline)).call(this, earth, guid));

        _this7._pointsColor = [1, 1, 0, 0.95];

        _this7.material.XbsjColorMaterial = new Color();
        _this7.material.XbsjPolylineDashMaterial = new PolylineDash();
        _this7.material.XbsjPolylineArrowMaterial = new PolylineArrow();
        _this7.material.XbsjODLineMaterial = new XbsjODLine();
        _this7.material.XbsjPolylineGlowMaterial = new PolylineGlow();
        _this7.material.XbsjPolylineOutlineMaterial = new PolylineOutline();

        _XbsjBase8.default.registerProperty(_this7, 'material', Polyline.defaultOptions.material);
        _XbsjBase8.default.registerProperty(_this7.material, 'XbsjColorMaterial');
        _XbsjBase8.default.registerProperty(_this7.material, 'XbsjPolylineDashMaterial');
        _XbsjBase8.default.registerProperty(_this7.material, 'XbsjPolylineArrowMaterial');
        _XbsjBase8.default.registerProperty(_this7.material, 'XbsjODLineMaterial');
        _XbsjBase8.default.registerProperty(_this7.material, 'XbsjPolylineGlowMaterial');
        _XbsjBase8.default.registerProperty(_this7.material, 'XbsjPolylineOutlineMaterial');

        _this7._primitive = undefined;
        _this7.disposers.push(function() {
          return _this7._primitive && _this7._earth.czm.scene.primitives.remove(_this7._primitive);
        });

        _this7._groundPrimitive = undefined;
        _this7.disposers.push(function() {
          return _this7._groundPrimitive && _this7._earth.czm.scene.groundPrimitives.remove(_this7
            ._groundPrimitive);
        });

        _this7._boundingSphere = undefined;

        _this7.disposers.push((0, _bind2.default)(_this7, 'enabled', _this7, 'show'));

        // // 材质单独处理，避免增上primitive
        // this._disposers.push(autorun(() => {
        //     const czmMaterial = this._materialMap[this.material.type];
        //     if (!this.material[this.material.type]) {
        //         const xbsjConstructor = XbsjObject.typesMap[this.material.type];
        //         this.material[this.material.type] = new xbsjConstructor();
        //     }
        //     const material = this.material[this.material.type];

        //     Object.keys(material._defaultOptions).forEach(key => {
        //         if (key === 'color' || key === 'gapColor') {
        //             czmMaterial.uniforms[key] = new Cesium.Color(...material[key]);
        //         } else {
        //             czmMaterial.uniforms[key] = material[key];
        //         }
        //     });        
        // }));

        var arcTypeMap = {
          GEODESIC: Cesium.ArcType.GEODESIC,
          NONE: Cesium.ArcType.NONE,
          RHUMB: Cesium.ArcType.RHUMB
        };

        {
          var createPrimitive = function createPrimitive() {
            var positions = (0, _uniquePositions2.default)(_this7.positions);
            if (positions.length <= 1) {
              return undefined;
            }
            var cartesians = positions.map(function(p) {
              var _Cesium$Cartesian;

              return (_Cesium$Cartesian = Cesium.Cartesian3).fromRadians.apply(_Cesium$Cartesian, (0,
                _toConsumableArray3.default)(p));
            });

            if (_this7.loop && positions.length >= 3) {
              cartesians.push(cartesians[0]);
              // 如果只首尾相连，导致的问题时width比较大时，首位相连的线段会有一个小缝
              cartesians.push(cartesians[1]);
            }
            var czmMaterial = _this7.material[_this7.material.type].material;

            var appearance = new Cesium.PolylineMaterialAppearance({
              material: czmMaterial,
              renderState: {
                depthTest: {
                  enabled: _this7.depthTest
                  // depthMask: this.depthMask, 设置无效，Appearance内部会强行设置
                }
                // translucent: this.forceTranslucent, // 这里的设置同样无效，因为material强制控制是否透明
              }
            });
            appearance.renderState.depthMask = false;

            var primitive = new Cesium.Primitive({
              geometryInstances: new Cesium.GeometryInstance({
                geometry: new Cesium.PolylineGeometry({
                  positions: cartesians,
                  width: _this7.width,
                  vertexFormat: Cesium.PolylineMaterialAppearance.VERTEX_FORMAT,
                  // arcType: Cesium.ArcType.RHUMB, // 会导致z轴忽隐忽现
                  arcType: arcTypeMap[_this7.arcType]
                }),
                id: _this7
              }),
              appearance: appearance,
              asynchronous: false, // 防止闪烁
              allowPicking: _this7.allowPicking, // 不允许拾取
              compressVertices: false // 提升效率
            });

            var ou = primitive.update;
            var that = _this7;
            primitive.update = function(frameState) {
              ou.call(this, frameState);
              this._colorCommands.forEach(function(e) {
                // e.pass = Cesium.Pass.OVERLAY;
                that.forcePass && (e.pass = that.forcePass);
              });
            };

            return primitive;
          };

          var createGroundPrimitive = function createGroundPrimitive() {
            var positions = (0, _uniquePositions2.default)(_this7.positions);
            if (positions.length <= 1) {
              return undefined;
            }
            var cartesians = positions.map(function(p) {
              var _Cesium$Cartesian2;

              return (_Cesium$Cartesian2 = Cesium.Cartesian3).fromRadians.apply(_Cesium$Cartesian2, (0,
                _toConsumableArray3.default)(p));
            });

            if (_this7.loop && positions.length >= 3) {
              cartesians.push(cartesians[0]);
              // 如果只首尾相连，导致的问题时width比较大时，首位相连的线段会有一个小缝
              cartesians.push(cartesians[1]);
            }
            var czmMaterial = _this7.material[_this7.material.type].material;

            var groundPrimitive = new Cesium.GroundPolylinePrimitive({
              geometryInstances: new Cesium.GeometryInstance({
                geometry: new Cesium.GroundPolylineGeometry({
                  positions: cartesians,
                  width: _this7.width,
                  vertexFormat: Cesium.PolylineMaterialAppearance.VERTEX_FORMAT,
                  // arcType: Cesium.ArcType.RHUMB, // 会导致z轴忽隐忽现
                  arcType: arcTypeMap[_this7.arcType]
                }),
                id: _this7
              }),
              appearance: new Cesium.PolylineMaterialAppearance({
                material: czmMaterial,
                renderState: {
                  depthTest: {
                    enabled: _this7.depthTest
                    // depthMask: this.depthMask,
                  }
                  // translucent: this.forceTranslucent, // 这里的设置同样无效，因为material强制控制是否透明
                }
              }),
              asynchronous: false, // 防止闪烁
              allowPicking: _this7.allowPicking, // 不允许拾取
              compressVertices: false // 提升效率
            });

            return groundPrimitive;
          };

          var createPolyline = function createPolyline() {
            var positions = _this7.positions;
            _this7._primitive && _this7._earth.czm.scene.primitives.remove(_this7._primitive);
            _this7._primitive = undefined;
            _this7._groundPrimitive && _this7._earth.czm.scene.groundPrimitives.remove(_this7._groundPrimitive);
            _this7._groundPrimitive = undefined;

            if (positions.length >= 2) {
              if (!_this7.ground) {
                _this7._primitive = createPrimitive();
                _this7._primitive && _this7._earth.czm.scene.primitives.add(_this7._primitive);
              } else {
                _this7._groundPrimitive = createGroundPrimitive();
                _this7._groundPrimitive && _this7._earth.czm.scene.groundPrimitives.add(_this7
                ._groundPrimitive);
              }
            }
          };

          var updatePolyline = function updatePolyline() {
            var show = _this7.show;
            _this7._primitive && (_this7._primitive.show = show);
            _this7._groundPrimitive && (_this7._groundPrimitive.show = show);

            var czmMaterial = _this7.material[_this7.material.type].material;
            _this7._primitive && (_this7._primitive.appearance.material = czmMaterial);
            _this7._groundPrimitive && (_this7._groundPrimitive.appearance.material = czmMaterial);
          };

          var updateBoundingSphere = function updateBoundingSphere() {
            var positions = _this7.positions;
            var cartesians = positions.map(function(p) {
              var _Cesium$Cartesian3;

              return (_Cesium$Cartesian3 = Cesium.Cartesian3).fromRadians.apply(_Cesium$Cartesian3, (0,
                _toConsumableArray3.default)(p));
            });
            _this7._boundingSphere = Cesium.BoundingSphere.fromPoints(cartesians, _this7._boundingSphere);
          };

          _this7.disposers.push((0, _mobx.reaction)(function() {
            return {
              positions: [].concat((0, _toConsumableArray3.default)(_this7.positions.map(function(e) {
                return [].concat((0, _toConsumableArray3.default)(e));
              }))),
              loop: _this7.loop,
              ground: _this7.ground,
              depthTest: _this7.depthTest,
              // depthMask: this.depthMask,
              // forceTranslucent: this.forceTranslucent,
              arcType: _this7.arcType,
              width: _this7.width,
              allowPicking: _this7.allowPicking
            };
          }, function() {
            createPolyline();
            updateBoundingSphere();
            updatePolyline();
          }));

          _this7.disposers.push((0, _mobx.autorun)(updatePolyline));
        }

        _this7._points = new _Points2.default(earth);
        _this7.disposers.push(function() {
          return _this7._points = _this7._points && _this7._points.destroy();
        });

        _this7.disposers.push((0, _mobx.reaction)(function() {
          return _this7.positions.map(function(p) {
            return [].concat((0, _toConsumableArray3.default)(p));
          });
        }, function(positions) {
          var diffLen = positions.length - _this7._points.points.length;
          if (diffLen > 0) {
            for (var i = 0; i < diffLen; ++i) {
              _this7._points.points.push({
                color: [].concat((0, _toConsumableArray3.default)(_this7._pointsColor))
              });
            }
          } else if (diffLen < 0) {
            for (var _i = 0; _i < -diffLen; ++_i) {
              var _this7$_points$points;

              _this7._points.points[positions.length + _i].show = false;
              (_this7$_points$points = _this7._points.points[positions.length + _i].color).splice.apply(
                _this7$_points$points, [0, 4].concat((0, _toConsumableArray3.default)(_this7
                  ._pointsColor)));
            }
          }

          positions.forEach(function(value, index) {
            var _this7$_points$points2;

            _this7._points.points[index].show = _this7.enabled;
            (_this7$_points$points2 = _this7._points.points[index].position).splice.apply(
              _this7$_points$points2, [0, 3].concat((0, _toConsumableArray3.default)(value)));
          });
        }, {
          fireImmediately: true
        }));

        _this7.disposers.push((0, _mobx.reaction)(function() {
          return _this7.show && _this7.showHelper || _this7.isSelected;
        }, function(show) {
          _this7._points.show = show;
        }, {
          fireImmediately: true
        }));

        _this7.disposers.push((0, _registerInteractionProperty.registerPolylineCreating)(_this7._earth, _this7, {
          polylineCreatingProperty: 'creating'
        }));

        _this7.disposers.push((0, _registerInteractionProperty.registerPolylineEditing)(_this7._earth, _this7, {
          polylineEditingProperty: 'editing'
        }));
        return _this7;
      }

      (0, _createClass3.default)(Polyline, [{
        key: 'flyTo',
        value: function flyTo() {
          var camera = this._earth.czm.scene.camera;
          camera.flyToBoundingSphere(this._boundingSphere);
        }

        // 暂不增加isSelected的联动
        // onclick() {
        //     this.isSelected = true;
        // }

        // onclickout() {
        //     this.isSelected = false;
        // }

      }, {
        key: 'destroy',
        value: function destroy() {
          return (0, _get3.default)(Polyline.prototype.__proto__ || (0, _getPrototypeOf2.default)(Polyline
            .prototype), 'destroy', this).call(this);
        }
      }, {
        key: 'boundingSphere',
        get: function get() {
          return this._boundingSphere;
        }
      }]);
      return Polyline;
    }(_XbsjCzmObj3.default);

    Polyline.defaultOptions = {
      positions: [],
      show: true,
      showHelper: false,
      width: 2,
      depthTest: false,
      // depthMask: false, // Appearance.getRenderState()函数会根据translucent来强制修改depthMask属性，透明的就强制不写深度，所以不能直接设置renderState
      // forceTranslucent: false, // 强制设置是否透明，如果强制透明，则depthMask为false
      forcePass: undefined,
      arcType: 'GEODESIC', // GEODESIC 地表最近距离插值 NONE 直线，不插值 RHUMB 保持地理方向一致的插值
      loop: false,
      material: {
        type: 'XbsjColorMaterial',
        XbsjColorMaterial: {},
        XbsjPolylineDashMaterial: {},
        XbsjPolylineArrowMaterial: {},
        XbsjODLineMaterial: {},
        XbsjPolylineGlowMaterial: {},
        XbsjPolylineOutlineMaterial: {}
      },
      ground: false
    };

    var xbsjSchema = {
      title: "Polyline Property",
      type: "object",
      properties: {
        /**
         * 位置数组，形式如 [[2.012, 0.65, 10], [1.9, 0.7, 20], ...] 每一个元素分别表示 经度、纬度、高度，其中经度纬度以弧度为单位，高度以米为单位
         * @type {array}
         * @instance
         * @default true
         * @memberof Obj.Polyline
         */
        positions: {
          type: 'array',
          title: '位置数组',
          default: [],
          description: '位置数组'
        },
        /**
         * 是否在三维窗口中显示
         * @type {boolean}
         * @instance
         * @default true
         * @memberof Obj.Polyline
         */
        show: {
          type: 'boolean',
          title: '是否在三维窗口中显示',
          default: true,
          description: '是否在三维窗口中显示'
        },
        /**
         * 是否显示辅助线框
         * @type {boolean}
         * @instance
         * @default false
         * @memberof Obj.Polyline
         */
        showHelper: {
          type: 'boolean',
          title: '是否显示辅助线框',
          default: false,
          description: '是否显示辅助线框'
        },
        /**
         * 线宽，单位像素
         * @type {number}
         * @instance
         * @default 2.0
         * @memberof Obj.Polygon
         */
        width: {
          type: 'number',
          title: '线宽，单位像素',
          default: 2.0,
          description: '线宽，单位像素'
        },
        /**
         * 是否开启深度检测
         * @type {boolean}
         * @instance
         * @default false
         * @memberof Obj.Polyline
         */
        depthTest: {
          type: 'boolean',
          title: '是否开启深度检测',
          default: false,
          description: '是否开启深度检测'
        },
        /**
         * 强制修改渲染顺序
         * 目前Cesium的渲染顺序有： <br/>
         *  ENVIRONMENT : 0, <br/>
         *  COMPUTE : 1, <br/>
         *  GLOBE : 2, <br/>
         *  TERRAIN_CLASSIFICATION : 3, <br/>
         *  CESIUM_3D_TILE : 4, <br/>
         *  CESIUM_3D_TILE_CLASSIFICATION : 5, <br/>
         *  CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW : 6, <br/>
         *  OPAQUE : 7, <br/>
         *  TRANSLUCENT : 8, <br/>
         *  OVERLAY : 9, <br/>
         *  NUMBER_OF_PASSES : 10 <br/>
         * @type {number|undefined}
         * @instance
         * @default undefined
         * @memberof Obj.Polyline
         */
        forcePass: {
          type: ['number', 'undefined'],
          title: '是否开启深度检测',
          default: undefined,
          description: '是否开启深度检测'
        },
        /**
         * 弧线样式，因为地球是圆形的，两点之间不能走直线，需要确定这个弧线该如何走 <br/>
         * 弧线样式有3种： <br/>
         * GEODESIC 地表最近距离插值 <br/>
         * NONE 直线，不插值 <br/>
         * RHUMB 保持地理方向一致的插值 <br/>
         * @type {string}
         * @instance
         * @default 'GEODESIC'
         * @memberof Obj.Polyline
         */
        arcType: {
          type: 'string',
          title: '弧线样式',
          default: 'GEODESIC',
          description: '弧线样式'
        },
        /**
         * 折线材质设置
         * @type {object}
         * @property {string} - 类型，可以是Color/PolylineDash/PolylineArrow/PolylineGlow/PolylineOutline/XbsjODLine
         * @property {Obj.Polyline.Material.Color}  - 纯颜色材质
         * @property {Obj.Polyline.Material.PolylineDash} - 点画线材质
         * @property {Obj.Polyline.Material.PolylineArrow} - 箭头材质
         * @property {Obj.Polyline.Material.PolylineGlow} - 发光材质
         * @property {Obj.Polyline.Material.PolylineOutline} - 外轮廓线材质
         * @property {Obj.Polyline.Material.XbsjODLine} - OD线材质
         * @instance
         * @memberof Obj.Polyline
         */
        material: {},
        /**
         * 是否首尾相连
         * @type {boolean}
         * @instance
         * @default false
         * @memberof Obj.Polyline
         */
        loop: {
          type: 'boolean',
          title: '是否首尾相连',
          default: false,
          description: '是否首尾相连'
        },
        /**
         * 是否贴地
         * @type {boolean}
         * @instance
         * @default true
         * @memberof Obj.Polyline
         */
        ground: {
          type: 'boolean',
          title: '是否贴地',
          default: true,
          description: '是否贴地'
        }
      }
    };

    Polyline.xbsjSchema = xbsjSchema;

    var xbsjClassification = [{
      name: {
        chinese: '通用',
        english: 'General'
      },
      properties: ['positions', 'show', 'showHelper', 'width', 'depthTest', 'forcePass', 'arcType', 'loop',
        'material', 'ground'
      ]
    }];

    Polyline.xbsjClassification = xbsjClassification;

    _XbsjObject2.default.registerType(Polyline, 'Polyline');

    exports.default = Polyline;

    /***/
  })